home *** CD-ROM | disk | FTP | other *** search
- /*
- Implements a preference file and resource io therein. Also handy
- for resource io in any LFile.
-
- Created 29 Jan 1996 by EGH
-
- Copyright © 1996, Apple Computer, Inc. All rights reserved.
- */
-
- #include <LFile.h>
-
- class CPreferences
- {
- public:
-
- CPreferences();
- CPreferences(
- LFile *inFile);
- CPreferences(
- OSType inFileType,
- OSType inFileCreator,
- StringPtr inFileNameP);
-
- virtual ~CPreferences();
-
- void FindOrCreatePreferencesFile(
- OSType inFileType,
- OSType inFileCreator,
- StringPtr inFileNameP);
-
- Handle GetPreferenceResource(
- OSType inResType,
- ResIDT inResID);
-
- void SavePreferenceResource(
- OSType inResType,
- ResIDT inResID,
- Handle inPrefH);
-
- private:
-
- LFile *mFile;
- Boolean mOwnsFile;
- };